<?php

namespace app\modules\Product\models;

use Yii;

/**
 * This is the model class for table "product_trip".
 *
 * @property int $id
 * @property int $product_id 团队ID
 * @property int $product_date_id 团队日期ID
 * @property string $trip_time 时间
 * @property int $supplier_id 供应商ID
 * @property string $en_content 英文行程内容
 * @property string $zh_content 中文行程内容
 * @property int $status 1正常  2 禁用 
 * @property int $user_id 创建人ID
 * @property string $created_at 创建时间
 * @property string $updated_at
 */
class ProductTrip extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'product_trip';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['product_id', 'product_date_id', 'supplier_id', 'status', 'user_id'], 'integer'],
            [['trip_time'], 'required'],
            [['trip_time', 'created_at', 'updated_at'], 'safe'],
            [['en_content', 'zh_content'], 'string'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'product_id' => Yii::t('app', 'Product ID'),
            'product_date_id' => Yii::t('app', 'Product Date ID'),
            'trip_time' => Yii::t('app', 'Trip Time'),
            'supplier_id' => Yii::t('app', 'Supplier ID'),
            'en_content' => Yii::t('app', 'En Content'),
            'zh_content' => Yii::t('app', 'Zh Content'),
            'status' => Yii::t('app', 'Status'),
            'user_id' => Yii::t('app', 'User ID'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
        ];
    }
}
